package cn.initcap.designpattern.pattern.creational.prototype.copyconstructor;

import java.util.Date;

/**
 * @author initcap
 * @date Created in 3/17/19 8:36 PM.
 */
public class Superme {

    private String name;

    private Date brithday;

    private int age;

    private String content;

    public Superme() {
        System.out.println("Superme Class Constructor !");
    }

    public Superme(Superme superme) {
        System.out.println("原型模式推荐使用的Copy Constructor !");
        this.age = superme.age;
        this.name = superme.name;
        this.brithday = superme.brithday;
        this.content = superme.content;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getBrithday() {
        return brithday;
    }

    public void setBrithday(Date brithday) {
        this.brithday = brithday;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "Superme{" +
                "name='" + name + '\'' +
                ", brithday=" + brithday +
                ", age=" + age +
                ", content='" + content + '\'' +
                '}';
    }
}
